package com.li.manage.enums;

public enum UserStateEnum {

	common(0,"正常"),stop(1,"停用");
	
	private Integer code;
	private String name;
	
	private UserStateEnum(Integer code,String name){
		this.code = code;
		this.name = name;
	}
	
	// 普通方法
    public static UserStateEnum getName(Integer code) {
        for (UserStateEnum c : UserStateEnum.values()) {
            if (c.getCode() == code) {
                return c;
            }
        }
        throw new IllegalArgumentException("unknown value:" + code);
    }
	
	
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	
}
